import axios from "axios";

const request = axios.create({
    baseURL: "http://localhost:8088",
    timeout: 20000
})

request.interceptors.response.use(res => {
    return res.data;
})

export function getInstance(token = ""){
    token !== "" && (request.defaults.headers.common['Authorization'] = "Bearer " + token)
    return request;
}
